package com.huika.renrench.model;

import java.io.Serializable;
import java.util.ArrayList;

import com.huika.lib.utils.MoneyShowTool;
import com.huika.renrench.control.main.shoptf.gallery.ProductImageArray;

/**
 * 项目详情
 * @author fanxing 创建于 Mar 31, 2015
 */
/**
 * 项目详情
 * 
 * @author fanxing 创建于 Mar 31, 2015
 */
public class ProjectDetail implements Serializable {

	public ArrayList<ProductImageArray> imageArray;
	/** 项目详情 */
	public String descriptionInfo;
	/** 学习时间 */
	public String courseLength;
	/** 商家名称 */
	public String projectName;
	/** 商家id */
	public String merchantId;
	/** 联系电话 */
	public String phone;
	/** 学费 */
	public String tradePrice;
	/** 学习时间 */
	public String learningTime;
	/** 地址 */
	public String address;
	/** 距离 */
	public String distance;
	/** 项目介绍 */
	public String introduction;
	/** 纬度 */
	public Double latitude;
	/** 经度 */
	public Double longitude;
	/** 是否关注 */
	public boolean isAttention;
	/** 商家名称 */
	public String shopName;
	
	public String auditStatus;
	public String categoryID;
	public String areaID;
	public String iDPath;
	public String namePath;
	public String auditRemark;
	public String typeName;
	public String areaName;
	public String userName;
	public String merchantName;
	public String tel;
	public String headImg;

//	"imagesArray": null,
//    "auditStatus": "2",
//    "shopName": "张老板",
//    "categoryID": "1146",
//    "areaID": "440306",
//    "iDPath": "^1^440000^440300^440306^",
//    "namePath": "^中国^广东省^深圳市^宝安区^",
//    "auditRemark": "345",
//    "typeName": "其他",
//    "areaName": "宝安区",
//    "isAttention": null,
//    "userName": "老张店",
//    "descriptionInfo": null,
//    "courseLength": null,
//    "merchantName": null,
//    "merchantId": 116224,
//    "tel": null,
//    "projectName": "开店",
//    "tradePrice": "10000",
//    "learningTime": "3个月",
//    "address": "民治街道梅坂大道256号",
//    "distance": "null",
//    "introduction": "好好开店",
//    "headImg": "null",
//    "latitude": "114.05742155",
//    "longitude": "114.05742155",
//    "phone": "13510213200",
//    "imageArray": [
//      {
//        "imageID": "678",
//        "imageUrl": "http://192.168.16.218/rrc1/M00/00/0B/wKgQ2lWBDMWAUxZvAAKDGL163vE205=250x250.jpg",
//        "type": "3",
//        "bigImageUrl": "http://192.168.16.218/rrc1/M00/00/0B/wKgQ2lWBDMWAUxZvAAKDGL163vE205=550x500.jpg"
//      },
//      {
//        "imageID": "679",
//        "imageUrl": "http://192.168.16.218/rrc1/M00/00/0B/wKgQ2lWBDPCAR9wyAACQJSKHDzU997=250x250.jpg",
//        "type": "2",
//        "bigImageUrl": "http://192.168.16.218/rrc1/M00/00/0B/wKgQ2lWBDPCAR9wyAACQJSKHDzU997=550x500.jpg"
//      },
//      {
//        "imageID": "676",
//        "imageUrl": "http://192.168.16.218/rrc1/M00/00/0B/wKgQ2lWBDMSAQXR_AAQd_2xNm9o197=250x250.jpg",
//        "type": "1",
//        "bigImageUrl": "http://192.168.16.218/rrc1/M00/00/0B/wKgQ2lWBDMSAQXR_AAQd_2xNm9o197=550x500.jpg"
//      }
//    ]
    		
    		
    		
	public String getDistance() {
		Double dis=0.0;
		if (!distance.equals("null")) {
			dis= Double.valueOf(distance);
		}
		
		if (dis < 0.1) {
			return 0.1 + "km";
			
		} else if(dis<1&&dis>0.1){
			return distance + "km";
		}else{
			return MoneyShowTool.nolastDF(dis) + "km";
		}
	}
}
